<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="copyright" content="本页版权 www.zongheng.com 纵横中文网所有。All Rights Reserved"/>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <link rel="shortcut icon" href="https://static.zongheng.com/favicon.ico"/>
        <title>[[${title}]]小说_小说推荐_好看的完本免费小说推荐- 纵横中文网</title>
        <meta name="keywords" content="十月的夏天最新章节, 十月的夏天全文阅读, 是十月的小说"/>
        <link rel="stylesheet" type="text/css" th:href="@{/static/layui/css/layui.css}"/>
        <link rel="stylesheet" type="text/css" href="/static/css/part1.css" th:href="@{/static/css/part1.css}"/>
    </head>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        a{
            text-decoration: none;
            color: #777777;
        }
        .clearfix {
            zoom: 1;
        }
        .book-main {
            width: 923px;
        }
        .fl {
            float: left;
        }
        .book-detail {
            padding: 10px 0 0;
        }
        .book-img {
            width: 200px;
            margin-left: 26px;
            margin-right: 26px;
            position: relative;
        }
        .book-img em {
            width: 43px;
            height: 19px;
            position: absolute;
            right: 0;
            top: 0;
            display: block;
        }
        .book-img img {
            box-shadow: 0 2px 4px 0 rgba(0,0,0,.2);
            border-radius: 4px;
            width: 200px;
            margin-right: 26px;
        }
        .book-info {
            overflow: hidden;
            padding-bottom: 30px;
        }
        .book-name {
            font-size: 24px;
            color: #333;
            letter-spacing: 1.33px;
            font-weight: 700;
            margin-bottom: 10px;
        }
        .book-label {
            margin-bottom: 20px;
            font-size: 0;
        }
        .book-label a {
            margin-right: 5px;
        }
        .label, .state {
            background: #02b389;
            border-radius: 2px;
            color: #fff;
            font-size: 12px;
            display: inline-block;
            padding: 0 5px;
            height: 20px;
            line-height: 20px;
        }
        .label {
            background: #d32f2f;
        }
        .label, .state {
            background: #02b389;
            border-radius: 2px;
            color: #fff;
            font-size: 12px;
            display: inline-block;
            padding: 0 5px;
            height: 20px;
            line-height: 20px;
        }
        .book-info .nums {
            color: #999;
            margin-bottom: 25px;
        }
        .book-info .nums span {
            margin-right: 20px;
        }
        .book-info .nums i {
            font-size: 16px;
            color: #333;
            font-family: Arial,Helvetica,sans-serif;
        }
        .book-dec {
            position: relative;
            min-height: 96px;
        }
        .book-dec.hide p {
            max-height: 76px;
            overflow: hidden;
        }
        .book-dec p {
            font-size: 14px;
            color: #333;
            line-height: 25px;
            margin-bottom: 5px;
        }
        .book-info .btn-group .btn {
            width: 220px;
            height: 36px;
            display: inline-block;
            line-height: 36px;
            margin-right: 7px;
        }
        .btn {
            display: block;
            height: 30px;
            line-height: 30px;
            color: #fff;
            font-size: 14px;
            text-align: center;
            background: #d32f2f;
            border-radius: 2px;
            letter-spacing: 1px;
            cursor: pointer;
        }
        .book-info .btn-group .store-btn {
            background: 0 0;
            border: 1px solid #edacac;
            color: #a11313;
            width: 100px;
            height: 34px;
            line-height: 34px;
            margin-right: 30px;
        }
        .book-info .btn-group .btn {
            width: 220px;
            height: 36px;
            display: inline-block;
            line-height: 36px;
            margin-right: 7px;
        }
        .btn {
            display: block;
            height: 30px;
            line-height: 30px;
            color: #fff;
            font-size: 14px;
            text-align: center;
            background: #d32f2f;
            border-radius: 2px;
            letter-spacing: 1px;
            cursor: pointer;
        }
        .book-info .btn-group .store-btn.stored {
            border: 1px solid #cdd0d6;
            color: #aaa;
        }
        .book-info .btn-group .store-btn {
            background: 0 0;
            width: 100px;
            height: 34px;
            line-height: 34px;
            margin-right: 30px;
        }
        .book-side {
            width: 237px;
            margin-right: 20px;
        }
        .fr {
            float: right;
        }
        .book-author {
            background: #f5f5f5;
            border: 1px solid #f0f0f0;
            padding: 13px 0 0;
            margin-bottom: 2px;
        }
        .au-head{
            text-align: center;
        }
        #orange-text{
            width: fit-content;
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 5px;
            color: #fff;
            background: #fc7403;
            border-radius: 3px;
        }
        #au-name a{
            color: #333;
        }
        .au-words{
            height: 40px;
            margin: 5px auto;
            font-size: 12px;
            text-align: center;
        }
        #wor1{
            width: 70px;
        }
        #wor2{
            margin-right: 20px;
            margin-left: 20px;
        }
        #wor3{
            width: 70px;
        }
        .au-says{
            width: 210px;
            margin: 20px auto;
            color: #c6c6c6;
        }

        .app-in {
            background: #f5f5f5;
            border: 1px solid #f0f0f0;
            padding: 16px 10px 16px 20px;
        }

        .book-new-chapter {
            padding-top: 10px;
            margin: 10px 26px;
            border-top: 1px solid #dedede;
        }
        .time{
            float: right;
            font-size: 12px;
            color: #999;
        }

    </style>
    <body>
        <div class="wrap">
            <div class="part1" th:replace="~{index/index::part1}"></div>
            <div class="h20-blank"></div>
            <!-- 书封页start -->
            <div id="container"  class="book-html-box clearfix">
                <!-- 书籍详细信息 -->
                <div   class="book-top clearfix">
                    <div  class="book-main fl">
                            <div class="book-detail clearfix">
                                <div class="book-img fl">
                                    <em class=""></em>
                                    <img th:src="${fiction.cover}" src="" th:alt="${fiction.bookName}"
                                         width="200" height="264" alt="">
                                </div>
                                <div class="book-info">
                                    <div th:text="${fiction.bookName}" class="book-name"></div>
                                    <div class="book-label">
                                        <!--KDX TODO 2023/6/7:该功能尚未开发-->
                                        <a href="" class="state" th:text="${fiction.state}" target="_blank"></a>
                                        <a href="" class="label" th:text="${fiction.type}" target="_blank"></a>
                                    </div>
                                    <div class="nums">
                                        <span>总点击 <i th:text="${fiction.views}"></i> </span> <span>周推荐 <i>0</i> </span>
                                    </div>
                                    <div class="book-dec Jbook-dec hide">
                                        <p th:text="${fiction.introduce}"><br>　</p>
                                    </div>
                                    <div class="btn-group">
                                        <a class="btn read-btn" target="_blank" th:href="'/chapter/read/'+${fiction.id}+'/1'">开始阅读</a>
                                        <a class="btn read-btn" target="_blank" th:href="'/chapter/list/'+${fiction.id}">章节目录</a>
                                        <div th:if="${presence}==false" id="add-shelf"
                                             th:name="${fiction.id}" class="btn store-btn no-stored">
                                            加入书架
                                        </div>
                                        <div th:if="${presence}==true"  class="btn store-btn stored">已在书架</div>
                                    </div>
                                </div>
                            </div>
                            <div class="book-new-chapter">
                                <h4>最新章节</h4>
                                <div class="tit">
                                    <a href="#" th:href="|@{/chapter/read/}${fiction.id}/${latest}|"
                                       th:text="${fiction.newest}" target="_blank"></a>
                                </div>
                                <div class="time">
                                    · 1小时前<br/>
                                    · 今日更新10章
                                </div>
                            </div>
                    </div>
                    <div class="book-side fr">
                        <div class="book-author">
                            <div class="au-head">
                                <div id="head-png">
                                    <a href="">
                                        <img th:src="@{/static/image/book.png}"
                                             src="" alt="是十月" width="60" height="60">
                                    </a>
                                </div>
                                <div id="orange-text"> 本书作家 </div>
                                <div id="au-name">
                                    <b><a th:text="${fiction.author}" href="">忘语</a></b>
                                </div>
                            </div>
                            <div class="au-words">
                                <div id="wor1" class="fl">
                                    <div>作品总数</div>
                                    <div>1</div>
                                </div>
                                <div id="wor2" class="fl">
                                    <div>累计字数</div>
                                    <div>3.9万</div>
                                </div>
                                <div id="wor3" class="fl">
                                    <div>本月更新</div>
                                    <div>1天</div>
                                </div>
                            </div>
                            <div class="au-says">
                                <h4 style="margin-bottom: 20px">作者有话说</h4>
                                <div class="con empty">作者大大正在奋力码字哦~~~</div>
                            </div>
                        </div>
                        <div class="app-in clearfix">
                        </div>
                    </div>
                </div>
            </div>
            <div class="h20-blank"></div>
            <!-- 书封end -->
        </div>
    </body>
    <style>
        #add-shelf:hover{
            background: #fc7403;
        }
        #hide {
            background: #f5f1e0;
            color: orange;
            font-size: 14px;
            position: absolute;
            bottom: 30px;
            right: 10px;
            width: 140px;
            line-height: 40px;
            text-align: center;
            border-radius: 5px;
        }
    </style>
    <script th:src="@{https://code.jquery.com/jquery-3.7.0.js}" src="/static/js/jquery-3.7.0.js"
            integrity="sha256-JlqSTELeR4TLqP0OG9dxM7yDPqX1ox/HfgiSLBj8+kM="
            crossorigin="anonymous"></script>
    <script th:inline="javascript">
        let user = [[${session.user}]]
        let btn = $('#add-shelf');
        btn.click(function (){
            let joinEl = $(btn).parent();
            if (user === null) {
                joinEl.css("position", "relative");
                let div = $('<div id="hide" class="layui-icon layui-icon-face-smile">请先登录哦</div>');
                $(joinEl).append(div);
                setTimeout(function () {
                    $(div).remove();
                },2000);
            }else {
                let url = "/shelf/" + $(btn).attr("name");
                $.ajax({
                    url: url,
                    type: 'post',
                    success: function () {
                        location.reload();
                    }
                });
            }
        });
    </script>
</html>